package archsw0904.controller.registration;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import archsw0904.model.ProfileClient;


public @Stateless class ProfileClientBean implements ProfileClientBeanLocal {

	@PersistenceContext
	EntityManager em;	
	
	@Override
	public void createProfileClient(String password, String name,
			String surname, String email, String address, String cap,
			String city, String telephone, String state){
		
		
		ProfileClient pu= new ProfileClient();
		pu.setLoginId(email);
		pu.setEmail(email);
		pu.setName(name);
		pu.setSurname(surname);
		pu.setPassword(password);
		pu.setAddress(address);
		pu.setCap(cap);
		pu.setCity(city);
		pu.setTelephone(telephone);
		pu.setState(state);
		
		em.persist(pu);
	}
	
}
